﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace fap
{
    /// <summary>
    /// Window1.xaml 的交互逻辑
    /// </summary>
    public partial class 输入页面 : Window
    {

        public string 输入="";
        public 输入页面()
        {
            try
            {
                InitializeComponent();
                this.WindowStartupLocation = WindowStartupLocation.CenterScreen;

               

            }
            catch
            {

            }
        }




        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Image button = (Image)sender;
            switch (button.Name)
            {
                case "确定":
                    {
                        Dispatcher.Invoke((Action)(() =>
                        {
                            if(输入框.Text!="")
                            {
                                输入 = 输入框.Text;
                                this.Hide();

                            }
                        })); 
                        break;
                    }
              

            }

        }



        private void 鼠标进入(object sender, MouseEventArgs e)
        {
            Image image = (Image)sender;
            switch (image.Tag.ToString())
            {
                case "勾":
                    {

                        Uri ur = new Uri("/fap;component/素材/提示页面/圈勾填充.png", UriKind.Relative);
                        BitmapImage bp = new BitmapImage(ur);
                        image.Source = bp;

                        break;

                    }
           




            }

            WPF动画类.ScaleEasingAnimationShow(image, 1, 1.2, 2, 0.5);

        }

        private void 鼠标移出(object sender, MouseEventArgs e)
        {
            Image image = (Image)sender;
            switch (image.Tag.ToString())
            {
                case "勾":
                    {

                        Uri ur = new Uri("/fap;component/素材/提示页面/圈勾.png", UriKind.Relative);
                        BitmapImage bp = new BitmapImage(ur);
                        image.Source = bp;

                        break;

                    }
               





            }

            WPF动画类.ScaleEasingAnimationShow(image, 1.2, 1, 2, 0.5);
        }

   
        private void 移动_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            base.DragMove();//实现整个窗口的拖动
        }
    }
}
